package com.ruoyi.kycinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kycinfo.mapper.KycIntegrityMapper;
import com.ruoyi.kycinfo.domain.KycIntegrity;
import com.ruoyi.kycinfo.service.IKycIntegrityService;

/**
 * kyc完善度
Service业务层处理
 *
 * @author wzk
 * @date 2023-10-26
 */
@Service
public class KycIntegrityServiceImpl implements IKycIntegrityService
{
    @Autowired
    private KycIntegrityMapper kycIntegrityMapper;

    /**
     * 查询kyc完善度

     *
     * @param integrityId kyc完善度
主键
     * @return kyc完善度

     */
    @Override
    public KycIntegrity selectKycIntegrityByIntegrityId(Long integrityId)
    {
        return kycIntegrityMapper.selectKycIntegrityByIntegrityId(integrityId);
    }

    @Override
    public KycIntegrity selectKycIntegrityByUserInfoId(Long userinfoId) {
        return kycIntegrityMapper.selectKycIntegrityByUserInfoId(userinfoId);
    }

    /**
     * 查询kyc完善度
列表
     *
     * @param kycIntegrity kyc完善度

     * @return kyc完善度

     */
    @Override
    public List<KycIntegrity> selectKycIntegrityList(KycIntegrity kycIntegrity)
    {
        return kycIntegrityMapper.selectKycIntegrityList(kycIntegrity);
    }

    /**
     * 新增kyc完善度

     *
     * @param kycIntegrity kyc完善度

     * @return 结果
     */
    @Override
    public int insertKycIntegrity(KycIntegrity kycIntegrity)
    {
        kycIntegrity.setCreateTime(DateUtils.getNowDate());
        return kycIntegrityMapper.insertKycIntegrity(kycIntegrity);
    }

    /**
     * 修改kyc完善度

     *
     * @param kycIntegrity kyc完善度

     * @return 结果
     */
    @Override
    public int updateKycIntegrity(KycIntegrity kycIntegrity)
    {
        kycIntegrity.setUpdateTime(DateUtils.getNowDate());
        return kycIntegrityMapper.updateKycIntegrity(kycIntegrity);
    }

    @Override
    public int updateKycIntegrityByUserinfoId(KycIntegrity kycIntegrity) {
        return kycIntegrityMapper.updateKycIntegrityByUserinfoId(kycIntegrity);
    }

    /**
     * 批量删除kyc完善度

     *
     * @param integrityIds 需要删除的kyc完善度
主键
     * @return 结果
     */
    @Override
    public int deleteKycIntegrityByIntegrityIds(Long[] integrityIds)
    {
        return kycIntegrityMapper.deleteKycIntegrityByIntegrityIds(integrityIds);
    }

    /**
     * 删除kyc完善度
信息
     *
     * @param integrityId kyc完善度
主键
     * @return 结果
     */
    @Override
    public int deleteKycIntegrityByIntegrityId(Long integrityId)
    {
        return kycIntegrityMapper.deleteKycIntegrityByIntegrityId(integrityId);
    }
}
